<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/plugins/axios/dist/axios.min.js"></script>
    <script src="js/plugins/vue/dist/vue.min.js"></script>
    <script src="js/commons.js"></script>
</head>
<body>
<h1 id="app">接收回调数据</h1>
</body>

<script>

    new Vue({

        el:"#app",

        data:{




        },
        methods:{





        },
         mounted(){
            // 获取url
            let data = getUrlData();
            this.$http.post("/wechat/login",data).then(res=>{
                if(res.data.success){
                    localStorage.setItem("token",res.data.resultObj.token)
                    localStorage.setItem("loginInfo",JSON.stringify(res.data.resultObj.loginInfo));
                    // 跳转到首页
                    location.href="/index.html"
                } else {
                    location.href=res.data.message;

                }
            })

         }

    })







</script>



















</html>